package com.erp.gis.idl;

import java.util.Vector;
import java.util.Map;

import com.paipai.lang.uint16_t;
import com.paipai.lang.uint32_t;
import com.paipai.lang.uint64_t;
import com.paipai.lang.uint8_t;
import com.paipai.util.annotation.ApiProtocol;
import com.paipai.util.annotation.Field;
import com.paipai.util.annotation.HeadApiProtocol;
import com.paipai.util.annotation.Member;

@HeadApiProtocol(cPlusNamespace = "erp::gis::ao", needInit = true, needReset = true)
public class GisMapGatewayAo {
    @Member(desc = "经纬度查询PO", cPlusNamespace = "erp::gis::po", isNeedUFlag = true, isNeedTempVersion = true)
    public class CoordinatesQueryPo {
        @Field(desc = " 版本号 ", defaultValue = "0")
        uint32_t version;
        uint8_t version_u;

        @Field(desc = "送达地省份(可选)")
        String destAddrProvince;
        uint8_t destAddrProvince_u;
        
        @Field(desc = "送达地市(必填)")
        String destAddrCity;
        uint8_t destAddrCity_u;
        
        @Field(desc = "送达地区(可选)")
        String destAddrDistrict;
        uint8_t destAddrDistrict_u;
        
        @Field(desc = "送达地的详细地址(需带省市区详细地址)仅支持UTF8格式输入")
        String destAddrDetail;
        uint8_t destAddrDetail_u;
		
		@Field(desc = "预留扩展字段 ")
        String reserve;
        uint8_t reserve_u;
    }
	
	@Member(desc = "经纬度PO", cPlusNamespace = "erp::gis::po", isNeedUFlag = true, isNeedTempVersion = true)
    public class CoordinatesPo {
        @Field(desc = " 版本号 ", defaultValue = "0")
        uint32_t version;
        uint8_t version_u;
		
		@Field(desc = "经度坐标  x轴")
        String xPoint;
        uint8_t xPoint_u;

        @Field(desc = "维度坐标  y轴")
        String yPoint;
        uint8_t yPoint_u;
		
		@Field(desc = "预留扩展字段 ")
        String reserve;
        uint8_t reserve_u;
    }
	
	@Member(desc = "地址经纬度结果PO(此结构体主要用于存结果数据到cache)", cPlusNamespace = "erp::gis::po", isNeedUFlag = true, isNeedTempVersion = true)
    public class AddrCoordinateResultPo {
        @Field(desc = " 版本号 ", defaultValue = "0")
        uint32_t version;
        uint8_t version_u;
		
		@Field(desc = "地图API类型对应经纬度列表")
        Map<uint32_t, Vector<CoordinatesPo>> apiType2Coordinates;
        uint8_t apiType2Coordinates_u;
        
        @Field(desc = "最匹配经纬度")
        CoordinatesPo closestCoordinate;
        uint8_t closestCoordinate_u;
        
        @Field(desc = "尝试过次数(尝试过一定次数后,将不在从地图中寻找经纬度)")
        uint32_t alreadyRetryNum;
        uint8_t alreadyRetryNum_u;
        
        @Field(desc = "信用级别")
        uint32_t trustLevel;
        uint8_t trustLevel_u;
        
        @Field(desc = "最后修改时间")
        uint64_t lastUpdateTime;
        uint8_t lastUpdateTime_u;

		@Field(desc = "预留扩展字段 ")
        String reserve;
        uint8_t reserve_u;
    }
   
    @ApiProtocol(cmdid = "0xc0251001L", desc = "获取soso地图经纬度 ")
	class GetSosoCoordinates {
		class Req {
			@Field(desc = "机器码，必填，对应网站cookie中的visitkey，若无则填随机值")
			String machineKey;

			@Field(desc = "调用来源文件名称，必填")
			String source;

			@Field(desc = "场景id，必填（目前填0即可）")
			uint32_t sceneId;

			@Field(desc = "经纬度查询PO")
			CoordinatesQueryPo coordinatesQueryPo;

			@Field(desc = "请求保留字段")
			String inReserve;
		}

		class Resp {
			@Field(desc = "经纬度PO列表")
			Vector<CoordinatesPo> coordinatesPo;
			
			@Field(desc = "错误信息")
			String errMsg;

			@Field(desc = "请求保留字段")
			String outReserve;
		}
    }
    
    @ApiProtocol(cmdid = "0xc0511001L", desc = "获取soso2地图经纬度 ")
	class GetSoso2Coordinates {
		class Req {
			@Field(desc = "机器码，必填，对应网站cookie中的visitkey，若无则填随机值")
			String machineKey;

			@Field(desc = "调用来源文件名称，必填")
			String source;

			@Field(desc = "场景id，必填（目前填0即可）")
			uint32_t sceneId;

			@Field(desc = "经纬度查询PO")
			CoordinatesQueryPo coordinatesQueryPo;

			@Field(desc = "请求保留字段")
			String inReserve;
		}

		class Resp {
			@Field(desc = "经纬度PO列表")
			Vector<CoordinatesPo> coordinatesPo;
			
			@Field(desc = "错误信息")
			String errMsg;

			@Field(desc = "请求保留字段")
			String outReserve;
		}
    }
    
    @ApiProtocol(cmdid = "0xc0521001L", desc = "获取baidu地图经纬度 ")
   	class GetBaiduCoordinates {
   		class Req {
   			@Field(desc = "机器码，必填，对应网站cookie中的visitkey，若无则填随机值")
   			String machineKey;

   			@Field(desc = "调用来源文件名称，必填")
   			String source;

   			@Field(desc = "场景id，必填（目前填0即可）")
   			uint32_t sceneId;

   			@Field(desc = "经纬度查询PO")
   			CoordinatesQueryPo coordinatesQueryPo;

   			@Field(desc = "请求保留字段")
   			String inReserve;
   		}

   		class Resp {
   			@Field(desc = "经纬度PO列表")
   			Vector<CoordinatesPo> coordinatesPo;
   			
   			@Field(desc = "错误信息")
   			String errMsg;

   			@Field(desc = "请求保留字段")
   			String outReserve;
   		}
    }

    @ApiProtocol(cmdid = "0xc0531001L", desc = "获取google地图经纬度 ")
   	class GetGoogleCoordinates {
   		class Req {
   			@Field(desc = "机器码，必填，对应网站cookie中的visitkey，若无则填随机值")
   			String machineKey;

   			@Field(desc = "调用来源文件名称，必填")
   			String source;

   			@Field(desc = "场景id，必填（目前填0即可）")
   			uint32_t sceneId;

   			@Field(desc = "经纬度查询PO")
   			CoordinatesQueryPo coordinatesQueryPo;

   			@Field(desc = "请求保留字段")
   			String inReserve;
   		}

   		class Resp {
   			@Field(desc = "经纬度PO列表")
   			Vector<CoordinatesPo> coordinatesPo;
   			
   			@Field(desc = "错误信息")
   			String errMsg;

   			@Field(desc = "请求保留字段")
   			String outReserve;
   		}
    }
    
    @ApiProtocol(cmdid = "0xc0541001L", desc = "获取阿里云地图经纬度 ")
   	class GetAliyunCoordinates {
   		class Req {
   			@Field(desc = "机器码，必填，对应网站cookie中的visitkey，若无则填随机值")
   			String machineKey;

   			@Field(desc = "调用来源文件名称，必填")
   			String source;

   			@Field(desc = "场景id，必填（目前填0即可）")
   			uint32_t sceneId;

   			@Field(desc = "经纬度查询PO")
   			CoordinatesQueryPo coordinatesQueryPo;

   			@Field(desc = "请求保留字段")
   			String inReserve;
   		}

   		class Resp {
   			@Field(desc = "经纬度PO列表")
   			Vector<CoordinatesPo> coordinatesPo;
   			
   			@Field(desc = "错误信息")
   			String errMsg;

   			@Field(desc = "请求保留字段")
   			String outReserve;
   		}
    }
    
    @ApiProtocol(cmdid = "0xc0551001L", desc = "获取高德地图经纬度 ")
   	class GetGaodeCoordinates {
   		class Req {
   			@Field(desc = "机器码，必填，对应网站cookie中的visitkey，若无则填随机值")
   			String machineKey;

   			@Field(desc = "调用来源文件名称，必填")
   			String source;

   			@Field(desc = "场景id，必填（目前填0即可）")
   			uint32_t sceneId;

   			@Field(desc = "经纬度查询PO")
   			CoordinatesQueryPo coordinatesQueryPo;

   			@Field(desc = "请求保留字段")
   			String inReserve;
   		}

   		class Resp {
   			@Field(desc = "经纬度PO列表")
   			Vector<CoordinatesPo> coordinatesPo;
   			
   			@Field(desc = "错误信息")
   			String errMsg;

   			@Field(desc = "请求保留字段")
   			String outReserve;
   		}
    }
}